'use strict';
const Service = require('egg').Service;

class HomeService extends Service {
    async getList() {
        const { app } = this;
        const QUERY_STR = '*';
        const sql = `select ${QUERY_STR} from goodsList`;

        try {
            const result = await app.mysql.query(sql);
            return result;
        } catch (error) {
            console.log(error);
            return null;
        }
    }
}

module.exports = HomeService;
